package util;

import checker.SemanticException;
import util.AST.Program;
import util.AST.Command.*;
import util.AST.Expression.*;
import util.AST.RHS.CallStatementRHS;
import util.AST.RHS.ExpressionRHS;
import util.AST.Statement.*;
import util.AST.Terminal.*;

public interface Visitor{
	//AST
	public Object visitProgram(Program prog, Object arg)throws SemanticException;
	//Command
	public Object visitFunctionBody(FunctionBody funB, Object arg)throws SemanticException;
	public Object visitFunctionDeclaration(FunctionDeclaration com, Object arg)throws SemanticException;
	public Object visitVariableDeclaration(VariableDeclaration com, Object arg)throws SemanticException;
	//Expression
	public Object visitBinaryExpression(BinaryExpression expr, Object arg)throws SemanticException;
	public Object visitBooleanUnaryExpression(BooleanUnaryExpression expr, Object arg)throws SemanticException;
	public Object visitIdentifierUnaryExpression(IdentifierUnaryExpression expr, Object arg)throws SemanticException;
	public Object visitNumberUnaryExpression(NumberUnaryExpression expr, Object arg)throws SemanticException;
	public Object visitUnaryExpression(UnaryExpression unExp, Object arg)throws SemanticException;
	//RHS
	public Object visitCallStatementRHS(CallStatementRHS rhs, Object arg)throws SemanticException;
	public Object visitExpressionRHS(ExpressionRHS expRHS, Object arg)throws SemanticException;
	//Statement
	public Object visitAssignStatement(AssignStatement statement, Object arg)throws SemanticException;
	public Object visitBreakStatement(BreakStatement statement, Object arg)throws SemanticException;
	public Object visitCallStatement(CallStatement statement, Object arg)throws SemanticException;
	public Object visitContinueStatement(ContinueStatement statement, Object arg)throws SemanticException;
	public Object visitIfElseStatement(IfElseStatement statement, Object arg)throws SemanticException;
	public Object visitPrintlnStatement(PrintlnStatement statement, Object arg)throws SemanticException;
	public Object visitReturnStatement(ReturnStatement statement, Object arg)throws SemanticException;
	public Object visitWhileStatement(WhileStatement statement, Object arg)throws SemanticException;
	//Terminal
	public Object visitBooleanValue(BooleanValue value, Object arg)throws SemanticException;
	public Object visitIdentifier(Identifier id, Object arg)throws SemanticException;
	public Object visitNumberValue(NumberValue value, Object arg)throws SemanticException;
	public Object visitOperator(Operator operator, Object arg)throws SemanticException;
	public Object visitType(Type type, Object arg)throws SemanticException;
	
}